package com.lzc.controller;

import com.lzc.listener.StartEvent;
import com.lzc.service.ListenerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/listener")
public class ListenerController {

    @Autowired
    private ListenerServiceImpl listenerService;

    @RequestMapping("/start/event/{msg}")
    public void sendEvent(@PathVariable("msg") String msg){
        listenerService.sendStartEvent(new StartEvent(msg));
    }

}
